<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ page import="com.google.appengine.api.users.User"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>

<!doctype html>
<!-- The DOCTYPE declaration above will set the    -->
<!-- browser's rendering engine into               -->
<!-- "Standards Mode". Replacing this declaration  -->
<!-- with a "Quirks Mode" doctype may lead to some -->
<!-- differences in layout.                        -->

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!--                                                               -->
<!-- Consider inlining CSS to reduce the number of requested files -->
<!--                                                               -->
<link type="text/css" rel="stylesheet" href="BLS_prototype.css">
<link type="text/css" rel="stylesheet" href="css/jQuizMe.css">


    <!--                                           -->
    <!-- Any title is fine                         -->
    <!--                                           -->
    <title>Basic Life Support</title>
    
    <!--                                           -->
    <!-- This script loads your compiled module.   -->
    <!-- If you add any GWT meta tags, they must   -->
    <!-- be added before this line.                -->
    <!--                                           -->
    <!-- script type="text/javascript" language="javascript" src="bls_prototype/bls_prototype.nocache.js"></script -->
    <script type="text/javascript" language="javascript" src="bls_prototype.js"></script>
    <script type="text/javascript" language="javascript" src="js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" language="javascript" src="js/jQuizMe-uncompressed.js"></script>
  </head>


<!--                                           -->
<!-- The body can have arbitrary html, or      -->
<!-- you can leave the body empty if you want  -->
<!-- to create a completely dynamic UI.        -->
<!--                                           -->
<body>

	<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
	<noscript>
		<div
			style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
			Your web browser must have JavaScript enabled in order for this
			application to display correctly.</div>
	</noscript>

	<h1>Basic Life Support</h1>

	<table align="center">
		<tr>
			<td colspan="2" style="font-weight: bold;">Welcome to the Basic
				Life Support Game! 
			<a href="javascript:sendFormToServer('mymail', 'mytext');">Klick
					me</a>  
			</td>
		</tr>
		<tr>
			<td colspan="2" style="font-weight: bold;">
				<div id="quizArea"></div></td>
		</tr>
		<tr>
			<form id="blsForm" action="/bls_prototype/postBLS" method="post">
				<div>
					<input id="email" type="hidden" name="email" value="your email" />
				</div>
				<div>
					<input id="content" type="hidden" name="content"></input>
				</div>
				<div>
					<input id="starttime" type="hidden" name="starttime"></input>
				</div>
				<div>
					<input id="enddtime" type="hidden" name="endtime"></input>
				</div>
				<div>
					<input id="score" type="hidden" name="score"></input>
				</div>
				<div>
					<input id="tried" type="hidden" name="tried"></input>
				</div>
				<div>
					<input id="total" type="hidden" name="total"></input>
				</div>
				<div>
					<input id="right" type="hidden" name="right"></input>
				</div>
				<div>
					<input id="wrong" type="hidden" name="wrong"></input>
				</div>  
				
			</form>
		</tr>
		<tr>
			<td colspan="2" style="color: red;" id="errorLabelContainer"></td>
		</tr>
	</table>
	<script type="text/javascript">
 $( function($){
	 /*	var quiz = [
        { 
                ques: "Silver", //question
                ans: "Ag", // answer
                ansInfo : "More info <a href='http://www.periodictable.com/Elements/079/index.html'>here</a>"  // answer information.
        },
        {
                ques: "Gold.", 
                ans: "Au", 
                ansInfo : "Gold-Au <br/>More info <a href='http://www.periodictable.com/Elements/079/index.html'>here</a>"
        }
	];
	var options = {
			addToEnd: " has what periodic symbol ?",
			quizType: "fill",  //Or you can write fillInTheBlank instead of fill.
			statusUpdate: jQuizMeStatusCallback
	};
	// quiz has 2 problems, while the options has set the quiz type to fill in the blank.
	$( "#quizArea" ).jQuizMe( quiz, options );
	
	//Display Version information.
	$( "#jqueryVersion" ).text( $.fn.jquery );
	$( "#jQuizMeVersion" ).text( $.fn.jQuizMe.version );
}); */

var quizMulti = {
        multiList:[
                { ques: "<img src='http://personalinjuryclaims1.co.uk/wp-content/uploads/2010/12/motorcycle-accident-claim.jpg'/>", ans: "hurry on", ansSel : ["check for response", "Notify security"] },
                { ques: "A car had an accident. What to do?", ans: "secure accident site", ansSel: ["open car and save victims", "drive on, but call the ambulance."] },
                { ques: "In a park you suddenly encounter a seemingly unconscious person. What to do?", ans: "Check response", ansSel: ["Leave him be", "Shout for help."] },
               	{ ques: "You visit your uncle bob on his chicken farm in Kentucky. When you make a joke about fried chickens, he suddenly gets angry and begins to gasp and hold his chest. What to do?", ans: "Help him sit down and get cellphone ready to call ambulance.", ansSel: ["It's better to go home now.","Put him down and make CPR."] },
              	{ ques: "Lydia is trying to eat 53 hotdogs in a eating competition. At hotdog 32 she gasps and chokes.", ans: "perform upward thrusts", ansSel: ["pat her back strongly", "get the medic"] },
              	{ ques: "Suddenly you find an unconscious guy in a somewhat strange body position. Now what?", ans: "Try to wake him up. If there is no response the need for help may be urgent.", ansSel: ["The guy is probably dead. Any help comes too late.", "Try to get the police's attention."] },
                { ques: "You are going on an ice rink. A girl has an accident right in front of you. What to do?", ans: "You get to a halt and check the victimfor response and head injuries.", ansSel: ["You get off the ice-skates to run for help.", "You try moving the victim off the ice-rink."] },
              	{ ques: "You just have been involved in a car crash on a highway. You are unhurt but the opponent looks worse. What to do as first action?", ans: "You try to get help from other drivers approaching.", ansSel: ["You start by pulling out the victim from the car window", "You call the ambulance"] },
            	{ ques: "A motorcycle has crashed and the victim seems seriously injured. What is the right action?", ans:"There are some bystanders. You send one of them to call the ambulance, the others should help securing the accident site.", ansSel: ["You start CPR immediately.", "You move the victim to safer grounds."] },
            	{ ques: "A bus driver got injured. What to do?", ans: "You check for response of the driver", ansSel: ["You alert other passengers to get help.", "You undo the buckle and move the driver out of the vehicle to attend him properly."] },
              	{ ques: "You are about to give cardiopulmonary resuscitation (CPR) to a victim. That means you give chest compressions and rescue breaths. How do you do that?", ans: "You give 30 compressions and then 2 breaths, with the compressions at a rate of 100/minute. Then you repeat", ansSel: ["You give 10 breaths and then 30 compressions at a speed of 75/minute. Then you repeat.", "You give 15 compressions and 5 breaths to the victim. The compressions at a rate of one per second. Then you repeat."] },
              	{ ques: "You are confronted with this device in an emergency situation. What's its use?", ans: "It both shows the pulse of the victim and gives electric shocks to revive the heartbeat.", ansSel: ["It helps measuring the correct pulse of a victim", "It helps in case the heartbeat of a victim has stopped."] }
                
        ]
};
var options = {

		statusUpdate: jQuizMeStatusCallback,
		disableRestart: true,
		disableDelete: true,
		blockCheck: false,
		review: false,
//		showAns: false

}
// quizMulti has 12 problems with 1 different quiz types.
$( "#quizArea" ).jQuizMe( quizMulti, options );
});


</script>
</body>
</html>
